<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #box1{ width: 400px; height: 100px;background-color: blue; margin: auto;}  /* auto  自适应，，自己会居中 */
        #box2{width: 300px;height: 300px; background-color: blue;}
        #box3{width: 100%;height: 100px; background-color: red;color: white;
        padding-left: 30px;border-left: 10px black;}
    </style>
</head>
<body>
    <div id="box1"> 这是一个盒子</div>
    <br>
    <br>
    <div id="box2">  
        <div id="box3">
              嵌套盒子
        </div>
    </div>
</body>
</html>
